/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package schoolpackage;

/**
 *
 * @author apple
 */
public class Monitor extends Student
{
    private String duty;
    private String phone;

    public Monitor() {
    }

    public Monitor(String name, int age, int num,String duty, String phone) {
        super(name, age, num);
        this.duty = duty;
        this.phone = phone;
    }

    public String getDuty() {
        return duty;
    }

    public void setDuty(String duty) {
        this.duty = duty;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }
    
    public void onDuty()
    {
        System.out.println(this.name+this.duty);
    }

    @Override
    public void doHomework() {
        System.out.println(this.name+" is collecting homework.");
    }
    
    
    
}
